import { useRoutes } from "react-router-dom";
// import route components

import Index from '@pages/index'
import NotFound from '@pages/system/notFound'
import Home from '@pages/home/'
import UserInfo from '@pages/user/userInfo'

function Routes() {
  return useRoutes([
    {
      path: "*",
      element: <NotFound />,
    },
    {
      path: "/",
      element: <Index />,
    },
    {
      path: "/home",
      element: <Home />,
    },
    {
      // 传值， 在目标页面使用useParams接收值
      path: "/userInfo/:name/:id",
      element: <UserInfo />,
    },
  ]);
}

export default  Routes